package com.cowmooed.controller;

import com.cowmooed.entity.Result;
import com.cowmooed.service.PromptService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/prompt")
@RestController
@RequiredArgsConstructor
public class PromptController {

    private final PromptService promptService;

    @GetMapping("/optimizePrompt")
    public Result OptimizePrompt(String prompt){
        String optimizePrompt = promptService.OptimizePrompt(prompt);
        return Result.success(optimizePrompt);
    }


}
